home *** CD-ROM | disk | FTP | other *** search
/ Minami 78 / MINAMI78.iso / Extra / winamp53.exe / $R0 / Winamp Modern / scripts / mainmenu.m < prev    next >
Text File  |  2005-09-15  |  1KB  |  47 lines

  1. #include <lib/std.mi>
  2. #include "attribs.m"
  3.  
  4. System.onScriptLoaded() {
  5.     initAttribs();
  6.     menubar_main_attrib.onDataChanged();
  7. }
  8.  
  9. menubar_main_attrib.onDataChanged() {
  10.   Group Player = getscriptgroup().findobject("player.content.dummy.group");
  11.   Group MenuBar = getscriptgroup().findobject("wasabi.menubar");
  12.   if (getData() == "1") {
  13.     Player.setXmlParam("y","0");
  14.     MenuBar.show();
  15.   } else {
  16.     Player.setXmlParam("y","-17");
  17.     MenuBar.hide();
  18.   }
  19. }
  20.  
  21. System.onKeyDown(String k) {
  22.   if (menubar_main_attrib.getData() == "0") return;
  23.   Layout l = getScriptGroup().getParentLayout();
  24.   if (!l.isActive()) return;
  25.   if (k == "alt+f") {
  26.     getScriptGroup().findObject("File.menu").sendAction("open", "", 0, 0, 0, 0);
  27.     complete;
  28.   }
  29.   if (k == "alt+p") {
  30.     getScriptGroup().findObject("Play.menu").sendAction("open", "", 0, 0, 0, 0);
  31.     complete;
  32.   }
  33.   if (k == "alt+o") {
  34.     getScriptGroup().findObject("Options.menu").sendAction("open", "", 0, 0, 0, 0);
  35.     complete;
  36.   }
  37.   if (k == "alt+i") {
  38.     getScriptGroup().findObject("View.menu").sendAction("open", "", 0, 0, 0, 0);
  39.     complete;
  40.   }
  41.   if (k == "alt+h") {
  42.     getScriptGroup().findObject("Help.menu").sendAction("open", "", 0, 0, 0, 0);
  43.     complete;
  44.  }
  45. }
  46.  
  47.